/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
 */

package model

import "time"

/*
* BalanceRecordId 记录号
* UserId 用户ID
* CloudUserId 云上用户ID
* OperatorId 操作者ID
* OperationType 操作类型充值1退款2
* OperationTime 操作时间
* Currency 币种,CNY
* Amount 操作金额
* PaymentMethod 支付方式,1--alipay,2--wechatpay ; 仅充值时有效
* PaymentStatus 支付状态,1--支付中,2--支付完成,3--支付失败 ; 仅充值时有效
 */

type BalanceRecord struct {
	BalanceRecordId string    `orm:"column(balance_record_id);size(64);pk;"`
	UserId          string    `orm:"column(user_id);size(64);"`
	CloudUserId     string    `orm:"column(cloud_user_id);size(64);"`
	OperatorId      string    `orm:"column(operator_id);size(64);"`
	OperationType   int       `orm:"column(operation_type);type(int);"`
	OperationTime   time.Time `orm:"column(operation_time);auto_now_add;size(datetime)"`
	Currency        string    `orm:"column(currency);size(10)"`
	Amount          float64   `orm:"column(amount);digits(17);decimals(2)"`
	PaymentMethod   string    `orm:"column(payment_method);size(10)"`
	PaymentStatus   string    `orm:"column(payment_status);size(10)"`
}
